<template>
	
	<view class="asset" >
		<view class="head" style="z-index: 999;">
			<view class="head_texts" ><image src="../../../static/public/img/fh.png"
				style="width: 18px;height: 18px;position: absolute;top:33px;left: 15px;" @click="black()"></image>返回</view>
			<view class="ss">充值</view>
			<view style="width: 10%;height: 25px;position: absolute;top:30px;right:5px;font-size: 14px;"  @click="gopayRecord()">记录</view>	
		</view>
		
		<view style="width: 100%;padding: 3%;">
			<view style="width:50%;float: left;">
				<view>
					<text style="color: #999;font-size: 11px;">账号：</text>
					<text style="font-size: 11px;">{{username}}</text>
				</view>
				<view style="margin-top: 5%;">
					<text style="color: #999;font-size: 11px;">余额：</text>
					<text style="font-size: 11px;">{{money}}</text>
					<text style="color: #999;font-size: 11px;">元</text>
				</view>
			</view>
			<view style="width:50%;float: left;"><button style="font-size: 11px;width:40%;border-color: #cd0006;color:#cd0006;border: 1px solid #cd0006;margin-top: 5%;margin-left: 45%;">联系客服</button></view>
		</view>
		<view style="width: 100%;padding: 3%;height:200px;margin-top: 10%;float: left;">
		<image src="../../../static/public/img/lxkf.jpg" style="width: 93%;height:200px;"></image>
		</view>
		
		<view style="width:100%;float: left;padding: 3%;height: 50px;border-bottom: 1px solid #e1dfdf;">
			<image src="../../../static/public/img/kf (2).png" style="width: 20px;height:20px;float: left;margin-top: 4%;"></image>
			<view style="font-size: 14px;float: left;height: 50px;line-height: 50px;margin-left: 4%;">在线客服1</view>
			<button style="float: left;font-size: 11px;width:20%;border-color: #cd0006;color:#cd0006;border: 1px solid #cd0006;margin-top: 5%;margin-left: 45%;height: 25px;line-height: 25px;margin-top: 4%;">点击联系</button>
		</view>

	
	</view>
</template>

<script>
	//导入组件
	export default {
		data() {
			return {
				username:'',
				money:0.00
			}
		},
		methods: {
             black(){
				// uni.navigateBack()
				uni.redirectTo({
					url:'/pages/components/home/home'
				})
			 },
			 gopayRecord(){
				 uni.navigateTo({
				 	url:'/pages/components/payRecord/payRecord'
				 })
			 },
			 index(){
				 this.$api.request('/api/index/recharge').then(res=>{
				 	this.username = res.data.username
					this.money = res.data.money
				 });
			 }
		},
		onShow() {
            this.index()
			uni.hideTabBar()
		},

	}
</script>

<style lang="scss">
	page {
		background-color: #f2f2f2;
	}

	.asset {
	   .head {
	   	background: #151516 !important;
	   	color: #fff;
	   	height: 130rpx;
	   	font-size: 18px;
	   }
	   .ss {
		 text-align: center;
		 line-height: 160rpx;
		 position: absolute;
		 top: 0px;
		 left: 45%;
	   }
	   .head_texts {
	   		font-size: 14px;
	   		margin-left: 9%;
	   		line-height: 160rpx;
	   }
	

	}
</style>
